import request from './index'

interface I18ngj {
  current: string
  pageSize: string
  code?: string
}

export const getI18nList = (data: Record<string, string>) => {
  const usp = new URLSearchParams(data)
  return request.get(`/i18n/list?${usp.toString()}`)
}

export const I18nDelete = (data: { code: string }) => {
  return request.delete(`/i18n/delete/${data.code}`)
}

export const I18nUpdate = (data: Record<string, any>) =>{
  return request.post('/i18n/update', data)
}

export const exportI18nCSV = () => {
  return request.get('/i18n/export', {
    responseType: 'blob',
  })
}
